package com.cn.demo.springboot.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class IndexController {

	@RequestMapping("/error1")
	public String error() {
		int a = 0 / 0;
		return "2131";
	}

	@RequestMapping("/hello")
	@ResponseBody
	public String index(HttpServletRequest httpServletRequest) {
		return "hello";
	}

	/**
	 * 进入首页
	 * 
	 * @return
	 */
	@RequestMapping("/index")
	public String index() {
		return "index";
	}

}